﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace LuyenThiVer03
{
    public partial class PageTraCuu : PhoneApplicationPage
    {
        string montracuu = "";
        public PageTraCuu()
        {
            InitializeComponent();           
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            try
            {
                montracuu = NavigationContext.QueryString["mon"];
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            base.OnNavigatedTo(e);

            if (montracuu == "toan")
            {
                PageTitle.Text = "MÔN TOÁN";
            }
            else if (montracuu == "ly")
            {
                PageTitle.Text = "MÔN LÝ";
            }
            else if (montracuu == "hoa")
            {
                PageTitle.Text = "MÔN HÓA";
            }
            else if (montracuu == "anh")
            {
                PageTitle.Text = "MÔN ANH";
            }
            else if (montracuu == "sinh")
            {
                PageTitle.Text = "MÔN SINH";
            }
            else if (montracuu == "su")
            {
                PageTitle.Text = "MÔN SỬ";
            }
            else if (montracuu == "dia")
            {
                PageTitle.Text = "MÔN ĐỊA";
            }
            else if (montracuu == "van")
            {
                PageTitle.Text = "MÔN VĂN";
            }
            else
            {
                MessageBox.Show("Mời bạn chọn lại môn cần tra cứu.");
                NavigationService.GoBack();
            }
            
        }
    }
}